package com.qf.common.pay.service;


import com.qf.common.pay.param.PayFinishParam;
import com.qf.common.pay.param.PayParam;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *  支付宝支付相关接口
 * @author zdl
 * @date 2025/4/1
 */
public interface PayService {

    /**
     * 调用预支付接口，生成二维码的路径
     * @param payParam
     * @return
     */
    String  createPayOrder(PayParam payParam);

    /**
     * 成功后的回调接口
     * @param request
     * @param response
     */
    PayFinishParam notify(HttpServletRequest request, HttpServletResponse response);

    /**
     * 根据业务订单号，查询交易订单状态
     * @param orderNo
     * @return 返回交易订单编号
     */
    String   payStatus(String orderNo);

    /**
     * 根据业务订单号，关闭交易订单
     * @param orderNo
     */
    void closePay(String orderNo);


    void refund(String  orderNo);

    void returnNotify(HttpServletRequest request, HttpServletResponse response);
}
